
<?php
define("_needlogin", "1");
define("_access", "1");
include_once("../include/db.config.php"); 
$teamId = (int)$_SESSION['team']['id'];
$sql = "SELECT id as chalid from challenge where enable=1 and FIND_IN_SET(id,(SELECT solves from team where id='$teamId'))";
$r = getAll($sql);
$rr = array();
$rr['solves'] = $r;
//var_dump($r);

echo json_encode($rr);